package com.ruoyi.admin.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.admin.mapper.MlPromotionDtoMapper;
import com.ruoyi.admin.domain.MlPromotionDto;
import com.ruoyi.admin.service.IMlPromotionDtoService;

/**
 * 优惠卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-18
 */
@Service
public class MlPromotionDtoServiceImpl extends ServiceImpl<MlPromotionDtoMapper, MlPromotionDto> implements IMlPromotionDtoService
{
    @Autowired
    private MlPromotionDtoMapper mlPromotionDtoMapper;

    /**
     * 查询优惠卷
     * 
     * @param id 优惠卷主键
     * @return 优惠卷
     */
    @Override
    public MlPromotionDto selectMlPromotionDtoById(Long id)
    {
        return mlPromotionDtoMapper.selectMlPromotionDtoById(id);
    }

    /**
     * 查询优惠卷列表
     * 
     * @param mlPromotionDto 优惠卷
     * @return 优惠卷
     */
    @Override
    public List<MlPromotionDto> selectMlPromotionDtoList(MlPromotionDto mlPromotionDto)
    {
        return mlPromotionDtoMapper.selectMlPromotionDtoList(mlPromotionDto);
    }

    /**
     * 新增优惠卷
     * 
     * @param mlPromotionDto 优惠卷
     * @return 结果
     */
    @Override
    public int insertMlPromotionDto(MlPromotionDto mlPromotionDto)
    {
        return mlPromotionDtoMapper.insertMlPromotionDto(mlPromotionDto);
    }

    /**
     * 修改优惠卷
     * 
     * @param mlPromotionDto 优惠卷
     * @return 结果
     */
    @Override
    public int updateMlPromotionDto(MlPromotionDto mlPromotionDto)
    {
        return mlPromotionDtoMapper.updateMlPromotionDto(mlPromotionDto);
    }

    /**
     * 批量删除优惠卷
     * 
     * @param ids 需要删除的优惠卷主键
     * @return 结果
     */
    @Override
    public int deleteMlPromotionDtoByIds(Long[] ids)
    {
        return mlPromotionDtoMapper.deleteMlPromotionDtoByIds(ids);
    }

    /**
     * 删除优惠卷信息
     * 
     * @param id 优惠卷主键
     * @return 结果
     */
    @Override
    public int deleteMlPromotionDtoById(Long id)
    {
        return mlPromotionDtoMapper.deleteMlPromotionDtoById(id);
    }
}
